Skip to main content
Version: 5.1.1

undelegateResource

The interface used to revoke delegated resource, which can specify the number of revoked resources. (v5.1.0 new interface)

Usage

tronWeb.transactionBuilder.undelegateResource(amount, receiverAddress, resource, address, options);

Parameters

ParametersDescriptionType
amountthe amount of assets to be revoked (sun), larger than 0String
receiverAddressthe account address to receive revoked delegation (base58 or hex)String
resourceasset type of revoked delegation, optional BANDWIDTH or ENERGYString
addressthe account address of the revoked delegation asset (base58 or hex)Number
optionsoptional fieldsNumber

Returns

Object

Example

> const transaction = await tronWeb.transactionBuilder.undelegateResource(10e6, 'receiverAddress', 'BANDWIDTH', 'ownerAddress');